#include <math.h>
#include <iostream>
#include <conio.h>

double f(double x)
{
	return sqrt(0.6*x + 1.7) / (2.1*x + sqrt(0.7*x*x + 1.0));
}

int main(int argc, char argv[])
{
	int n = 50;
	double a = 1.2;
	double b = 2.0;
	double x = 0.0;
	double result = 0.0;
	double h = (b-a) / n;

	for(int i=1; i<n-1; i++)
	{
		x = a + (h)*i;
		result += h * f(x);
	}

	result += f(a) * h  +  f(b) * h;

	std::cout << "Resultat: " << result;

	getch();

	return 0;
}
